// 7_6.c  Passing Addresses to a Function
#include <stdio.h>

int main()
{
    void newval(float *); /*prototype with a pointer parameter*/
    float testval;

    printf("\nEnter a number: ");
    scanf("%f", &testval);

    printf("The address that will be passed is %u\n\n", &testval);

    newval(&testval); /*call the function*/

    return 0;
}

void newval(float *xnum) /*function header using a pointer parameter*/
{
    printf("The address received is %u\n", xnum);
    printf("The value pointed to by xnum is: %5.2f \n", *xnum);
}